-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global Styles: Presets: Show the default empty variation as well as the other presets #59717
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +145 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
92ca9ec
to
c5a44d7
Compare
I think this is a very important step that could open up solutions for multiple problems. One of those is the fact that whenever a user makes changes to their global styles, those get lost if the user changes to a different style variation. This makes sense in a way since the user changes are being saved on top of the default variation, which we had no way to go back to before this PR besides undoing the user changes. I wonder if the next step is to create a "user" variation under the presets that is independent of the default presets and can persist regardless of the default preset chosen by the user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I think this is a very nice adition
…he other presets (WordPress#59717) * Show the default empty variation as well as the other presets * remove unconnected change * filter out duplicate color variations and leave the default alone * add a comment * rename hooks * Make default translatable Co-authored-by: scruffian <scruffian@git.wordpress.org> Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org> Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: matiasbenedetto <mmaattiiaass@git.wordpress.org>
It seems to be working OK on the latest trunk. |
What?
This shows the default preset as well as the variations...
Why?
...so that users can set them back to the original settings that came with the theme.
How?
Add empty default variations to the ones we fetch from the store.
Fixes #59574
Testing Instructions
Screenshots or screencast